package miiteen.hb.webservice.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import miiteen.core.result.ResultMessage;
import miiteen.core.result.ResultMessageTool;
import miiteen.hb.webservice.beans.FileListResponse;
import miiteen.hb.webservice.service.ApiService;
import miiteen.hb.webservice.service.FileListService;
import miiteen.hb.webservice.util.ResponseUtil;
import org.dom4j.DocumentException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.rmi.RemoteException;
import java.util.List;

@Api("文件列表接口")
@RequestMapping("/hb/filelist")
@RestController
public class FileListController {

    @Autowired
    private FileListService fileListService;

    @ApiOperation("兰关动态")
    @GetMapping("/lgdt")
    public ResultMessage<FileListResponse> list(@RequestParam int page) throws RemoteException, DocumentException {
        FileListResponse fileListResponse = fileListService.lgdt(page, 10);
        return ResultMessageTool.Success("", fileListResponse);
    }
}
